
package GUI_3GE;

public class Select2DeleteRestaurantFrame extends javax.swing.JFrame {

    /** Creates new form SelectModifyRestaurantFrame */
    public Select2DeleteRestaurantFrame() {
        initComponents();
    }

  
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        select2DeleteTextLabel = new javax.swing.JLabel();
        exitAdminButton = new javax.swing.JButton();
        deleteRestaurantButton = new javax.swing.JButton();
        modifyRestaurantButton = new javax.swing.JButton();
        adminLogoLabel = new javax.swing.JLabel();
        addRestaurantButton = new javax.swing.JButton();
        select2DeleteScrollPane = new javax.swing.JScrollPane();
        select2DeleteTable = new javax.swing.JTable();
        select2DeleteButton = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        select2DeleteTextLabel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        select2DeleteTextLabel.setText("Διαγραφή Εστιατορίου");
        select2DeleteTextLabel.setToolTipText("");

        exitAdminButton.setText("Έξοδος");
        exitAdminButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitAdminButtonActionPerformed(evt);
            }
        });

        deleteRestaurantButton.setText("Διαγραφή Εστιατορίου");
        deleteRestaurantButton.setEnabled(false);

        modifyRestaurantButton.setText("Τροποποίηση Εστιατορίου");
        modifyRestaurantButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                modifyRestaurantButtonActionPerformed(evt);
            }
        });

        adminLogoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/GUI_3GE/logo.png"))); // NOI18N
        adminLogoLabel.setToolTipText("");

        addRestaurantButton.setText("Εισαγωγή Εστιατορίου");
        addRestaurantButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addRestaurantButtonActionPerformed(evt);
            }
        });

        select2DeleteTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null},
                {null, null, null, null, null}
            },
            new String [] {
                "Όνομα", "Διεύθυνση", "Περιοχή", "Τηλέφωνο", "Περιοχή"
            }
        ));
        select2DeleteScrollPane.setViewportView(select2DeleteTable);

        select2DeleteButton.setText("Διαγραφή");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(exitAdminButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(deleteRestaurantButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(addRestaurantButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(modifyRestaurantButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addComponent(adminLogoLabel))
                        .addGap(18, 18, 18)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(select2DeleteTextLabel)
                            .addComponent(select2DeleteScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 513, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap())
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addGap(0, 410, Short.MAX_VALUE)
                        .addComponent(select2DeleteButton)
                        .addGap(231, 231, 231))))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(adminLogoLabel)
                    .addComponent(select2DeleteTextLabel))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(addRestaurantButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(modifyRestaurantButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(deleteRestaurantButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(exitAdminButton))
                    .addComponent(select2DeleteScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addComponent(select2DeleteButton)
                .addContainerGap(27, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void exitAdminButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitAdminButtonActionPerformed
        System.exit(0); //έξοδος
    }//GEN-LAST:event_exitAdminButtonActionPerformed

    private void addRestaurantButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addRestaurantButtonActionPerformed
     AddRestaurantPanel addRest = new AddRestaurantPanel();
     addRest.setVisible(true);
     this.dispose();
    }//GEN-LAST:event_addRestaurantButtonActionPerformed

    private void modifyRestaurantButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modifyRestaurantButtonActionPerformed
        SelectModifyRestaurantFrame modRest = new SelectModifyRestaurantFrame();
       modRest.setVisible(true);
       this.dispose();
    }//GEN-LAST:event_modifyRestaurantButtonActionPerformed

  
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton addRestaurantButton;
    private javax.swing.JLabel adminLogoLabel;
    private javax.swing.JButton deleteRestaurantButton;
    private javax.swing.JButton exitAdminButton;
    private javax.swing.JButton modifyRestaurantButton;
    private javax.swing.JButton select2DeleteButton;
    private javax.swing.JScrollPane select2DeleteScrollPane;
    private javax.swing.JTable select2DeleteTable;
    private javax.swing.JLabel select2DeleteTextLabel;
    // End of variables declaration//GEN-END:variables
}
